package com.annet.token.repository;

import com.annet.token.model.ServerSetting;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

/**
 * @author dingjb
 * @date 2020/12/31
 */
public interface ServerSettingDao extends JpaRepository<ServerSetting, Long>, JpaSpecificationExecutor<ServerSetting> {

    ServerSetting findByOrgCode(String orgCode);

    Optional<ServerSetting> findByOrgCodeAndUnameAndPwd(String orgCode, String uname, String pwd);

    Boolean existsByOrgCodeAndUnameAndPwd(String orgCode, String uname, String pwd);
}
